unit HomeController;

interface

uses
  WebAPI_Controller, BaseController, WebApi_Tool;

type
  [TRoute('')]
  THomeController = class(TBaseController)
  public
    [TPath('get', POST)]
    procedure get;
  end;

implementation

uses
  uDB, uUser;

{ Tuser }

procedure THomeController.get;
begin
  var user := self.InputToObj<TUsers>;
  var query := db.Query<TUsers>;
  query.Where('select * from users order by id desc');
  query.Append;
  query.Table.username := 'adminqwe';
  query.Post;
  query.Refresh;
  ShowText(DSToJArray(query));
end;

end.

